﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Rabbit.Contracts.Interface;

namespace Rabbit.API.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    
    public class GoodsController : ControllerBase
    {
        private readonly IGoodService _goodService;
        private readonly ILogger<GoodsController> _logger;

        public GoodsController(IGoodService goodService, ILogger<GoodsController> logger)
        {
            _goodService = goodService;
            _logger = logger;
        }

        /// <summary>
        /// 商品下拉框绑定
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetGoods()
        {
            var list=_goodService.GetGoods();
            return Ok(list);
        }


    }
}
